local Emit = Sound("Weapon_Shotgun.Single")

local function Turret(Player, Entity, Victim, Position, Ang)
	local Bullet = {}
	
	Bullet.Num = 8
	Bullet.Src = Position
	Bullet.Dir = Ang
	Bullet.Spread = Vector(0.1, 0.1, 0.1)
	Bullet.Tracer = 1
	Bullet.Force = Entity:GetEntityRadius()
	Bullet.TracerName = "Tracer"
	Bullet.Attacker = Player
	Bullet.Damage = 10
	
	Entity:FireBullets(Bullet)
	
	Entity:EmitSound(Emit)
	
	local Effect = EffectData()
	
	Effect:SetOrigin(Position)
	Effect:SetAngle(Ang)
	
	util.Effect("ShotgunShellEject", Effect)
	
	return 0.5
end

PerimeterTurret.Add("Shotgun", Turret)